/**
 * Created by yuming619 on 2016/10/27.
 */

cmt_mall.run(
    [          '$rootScope', '$state', '$stateParams',
        function ($rootScope,   $state,   $stateParams) {
            $rootScope.$state = $state;
            $rootScope.$stateParams = $stateParams;
        }
    ]
)

cmt_mall.config(
    [          '$stateProvider', '$urlRouterProvider','$locationProvider',
        function ($stateProvider,   $urlRouterProvider,$locationProvider) {
            $urlRouterProvider
                .when('/detail/:id/:tag','/detail/:id')
                .when('/menu/:shopid/:tag','/menu/:shopid')
                .when('/shop/:id/:cid','/shop/:id')
                .when('/cmtshop/placeorder/:id','/cmtshop/placeorder')
                .otherwise('/?menus=123');
            // use the HTML5 History API
            $locationProvider.html5Mode(html5mode);
        }
    ]
)
;